package com.sojson.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sojson.dao.UserActivityDao;
import com.sojson.entity.po.UserActivity;
import com.sojson.service.UserActivityService;

/**
 * 用户参加活动Service实现类
 * 
 * @author liu
 * @date 2021-06-07
 */
@Service
public class UserActivityServiceImpl implements UserActivityService {

    @Resource
    private UserActivityDao userActivityDaoImpl;

    /**
     * 单条插入
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int insert(UserActivity userActivity) {
        int insert = userActivityDaoImpl.insert(userActivity);
        return insert;
    }

    /**
     * 批量插入
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int insertList(UserActivity userActivity) {
        int insertList = userActivityDaoImpl.insertList(userActivity.getUserActivitys());
        return insertList;
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int deleteByDto(UserActivity userActivity) {
        int deleteByDto = userActivityDaoImpl.deleteByDto(userActivity);
        return deleteByDto;
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        int countAll = userActivityDaoImpl.countAll();
        return countAll;
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<UserActivity> listAll() {
        List<UserActivity> findAll = userActivityDaoImpl.listAll();
        return findAll;
    }

    /**
     * 根据对象统计数量
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int countByDto(UserActivity userActivity) {
        int countByDto = userActivityDaoImpl.countByDto(userActivity);
        return countByDto;
    }

    /**
     * 根据对象查询
     * 
     * @param userActivity
     * @return
     */
    @Override
    public List<UserActivity> listByDto(UserActivity userActivity) {
        List<UserActivity> findByDto = userActivityDaoImpl.listByDto(userActivity);
        return findByDto;
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        int deleteById = userActivityDaoImpl.deleteById(id);
        return deleteById;
    }

    /**
     * 通过id数组删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIds(Integer[] ids) {
        int deleteByIds = userActivityDaoImpl.deleteByIds(ids);
        return deleteByIds;
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateAllById(UserActivity userActivity) {
        int updateAllById = userActivityDaoImpl.updateAllById(userActivity);
        return updateAllById;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateAllByIdList(UserActivity userActivity) {
        int updateAllByIdList = userActivityDaoImpl.updateAllByIdList(userActivity);
        return updateAllByIdList;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateDtoListAllById(UserActivity userActivity) {
        int updateDtoListAllById = userActivityDaoImpl.updateDtoListAllById(userActivity.getUserActivitys());
        return updateDtoListAllById;
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateById(UserActivity userActivity) {
        int updateById = userActivityDaoImpl.updateById(userActivity);
        return updateById;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateByIdList(UserActivity userActivity) {
        int updateByIdList = userActivityDaoImpl.updateByIdList(userActivity);
        return updateByIdList;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateDtoListById(UserActivity userActivity) {
        int updateDtoListById = userActivityDaoImpl.updateDtoListById(userActivity.getUserActivitys());
        return updateDtoListById;
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public UserActivity findById(Integer id) {
        UserActivity findById = userActivityDaoImpl.findById(id);
        return findById;
    }

    /**
     * 通过id数组查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<UserActivity> findByIds(Integer[] ids) {
        List<UserActivity> findByIds = userActivityDaoImpl.findByIds(ids);
        return findByIds;
    }

    /**
     * 通过对象查询id列表
     * 
     * @param userActivity
     * @return
     */
    @Override
    public List<Integer> findIdByDto(UserActivity userActivity) {
        List<Integer> findIdByDto = userActivityDaoImpl.findIdByDto(userActivity);
        return findIdByDto;
    }

    /**
     * 通过no删除(物理删除)
     * 
     * @param no
     * @return
     */
    @Override
    public int deleteByNo(String no) {
        int deleteByNo = userActivityDaoImpl.deleteByNo(no);
        return deleteByNo;
    }

    /**
     * 通过no数组删除(物理删除)
     * 
     * @param nos
     * @return
     */
    @Override
    public int deleteByNos(String[] nos) {
        int deleteByNos = userActivityDaoImpl.deleteByNos(nos);
        return deleteByNos;
    }

    /**
     * 通过no更新(全部更新)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateAllByNo(UserActivity userActivity) {
        int updateAllByNo = userActivityDaoImpl.updateAllByNo(userActivity);
        return updateAllByNo;
    }

    /**
     * 通过no列表更新(全部更新)(更新内容相同)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateAllByNoList(UserActivity userActivity) {
        int updateAllByNoList = userActivityDaoImpl.updateAllByNoList(userActivity);
        return updateAllByNoList;
    }

    /**
     * 通过no列表更新(全部更新)(更新内容不相同)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateDtoListAllByNo(UserActivity userActivity) {
        int updateDtoListAllByNo = userActivityDaoImpl.updateDtoListAllByNo(userActivity.getUserActivitys());
        return updateDtoListAllByNo;
    }

    /**
     * 通过no更新(局部更新)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateByNo(UserActivity userActivity) {
        int updateByNo = userActivityDaoImpl.updateByNo(userActivity);
        return updateByNo;
    }

    /**
     * 通过no列表更新(局部更新)(更新内容相同)
     * 
     * @param userActivity
     * @return
     */
    @Override
    public int updateByNoList(UserActivity userActivity) {
        int updateByNoList = userActivityDaoImpl.updateByNoList(userActivity);
        return updateByNoList;
    }

    /**
     * 通过no列表更新(局部更新)(更新内容不相同)
     * 
     * @param userActivitys
     * @return
     */
    @Override
    public int updateDtoListByNo(UserActivity userActivity) {
        int updateDtoListByNo = userActivityDaoImpl.updateDtoListByNo(userActivity.getUserActivitys());
        return updateDtoListByNo;
    }

    /**
     * 通过no查询
     * 
     * @param no
     * @return
     */
    @Override
    public UserActivity findByNo(String no) {
        UserActivity findByNo = userActivityDaoImpl.findByNo(no);
        return findByNo;
    }

    /**
     * 通过no数组查询
     * 
     * @param nos
     * @return
     */
    @Override
    public List<UserActivity> findByNos(String[] nos) {
        List<UserActivity> findByNos = userActivityDaoImpl.findByNos(nos);
        return findByNos;
    }

    /**
     * 通过对象查询no列表
     * 
     * @param userActivity
     * @return
     */
    @Override
    public List<String> findNoByDto(UserActivity userActivity) {
        List<String> findNoByDto = userActivityDaoImpl.findNoByDto(userActivity);
        return findNoByDto;
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public int clear() {
        return userActivityDaoImpl.clear();
    }

}